Page({
    data:{
        title:"天外来物",
        time:"2020-12-31",
        singer:"薛之谦",
        url:"http://p1.music.126.net/MgH6SepYHboKPr6FR8yg-w==/109951167040040692.jpg?param=177y177",
        list:[
            {
                id:1463165983,
                videoSrc:"http://link.hhtjim.com/163/1463165983.mp3",
                songname:"天外来物",
                name:"薛之谦",
            },
            {
                id:1808053189,
                videoSrc:"http://link.hhtjim.com/163/1808053189.mp3",
                songname:"迟迟",
                name:"薛之谦",
            },
            {
                id:1806096611,
                videoSrc:"http://link.hhtjim.com/163/1806096611.mp3",
                songname:"把你揉碎捏成苹果",
                name:"薛之谦",
            },
            {
                id:1803349526,
                videoSrc:"http://link.hhtjim.com/163/1803349526.mp3",
                songname:"野心",
                name:"薛之谦",
            },
            {
                id:1486513704,
                videoSrc:"http://link.hhtjim.com/163/1486513704.mp3",
                songname:"彩券",
                name:"薛之谦",
            },
            {
                id:1463168014,
                videoSrc:"http://link.hhtjim.com/163/1463168014.mp3",
                songname:"不爱我",
                name:"薛之谦",
            },
            {
                id:1808157402,
                videoSrc:"http://link.hhtjim.com/163/1808157402.mp3",
                songname:"潘金莲",
                name:"薛之谦",
            },
            {
                id:1498342485,
                videoSrc:"http://link.hhtjim.com/163/1498342485.mp3",
                songname:"耗尽",
                name:"薛之谦 / 郭聪明",
            },
            {
                id:1473782328,
                videoSrc:"http://link.hhtjim.com/163/1473782328.mp3",
                songname:"小尖尖",
                name:"薛之谦 / 韩红",
            },
            {
                id:1442312981,
                videoSrc:"http://link.hhtjim.com/163/1442312981.mp3",
                songname:"纸船",
                name:"薛之谦 / 郁可唯",
            }




        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})